#include <iostream>
#include <future>

std::future<int> future01 = std::async([&]() {
	std::cout << "future01" << std::endl;
	return 0;
	});

std::future<int> future02 = std::async([&]() {
	std::cout << "future02" << std::endl;
	return 0;
	});

std::future<int> future03 = std::async([&]() {
	std::cout << "future03" << std::endl;
	return 0;
	});

std::future<int> future04 = std::async([&]() {
	std::cout << "future04" << std::endl;
	return 0;
	});

std::future<int> future05 = std::async([&]() {
	std::cout << "future05" << std::endl;
	return 0;
	});

std::future<int> future06 = std::async([&]() {
	std::cout << "future06" << std::endl;
	return 0;
	});

void Task(int num) {
	std::cout << num << std::endl;
}

//int MultiFutureInVector() 
int main() 
{
	future01.get();
	future02.get();
	future03.get();
	future04.get();
	future05.get();
	future06.get();

	//std::vector<std::future<int>> futures;
	//for (int i = 0; i < 10; i++)
	//{
	//	std::future<int> future_tmp = std::future<int>(Task);
	//	futures.emplace_back()
	//}

	return 0;
}
